package cn.ac.iscas.dao;

import cn.ac.iscas.domain.job.Job;
import cn.ac.iscas.domain.job.JobSearch;

import java.util.Date;
import java.util.List;

public interface IJobMetadataDao {
    List<Job> select(JobSearch jobSearch);

    List<Job> selectByGroup(JobSearch jobSearch);

    List<Job> selectAll();

    int save(Job job);

    int upsert(Job job);

    int save(List<Job> jobs);

    int update(Job job);

    boolean delete(String id);

    int selectCount(String column);


    boolean deleteBatch(List<String> ids);


    Job getJob(String id);

    List<Job> selectByIds(List<String> ids);

    List<Job> getPreJobs(String id);

    int updateJobStatus(String id, String status);

    int updateJobStatusDuration(String id, String status, Long duration);

    int updateJobExecuteTime(String id, Date executeTime);
}
